#! /bin/bash

#Script used to test Grades.jar


echo "Start of Script"

echo "Test Case 1: Testing 10/39..."

tc=`java -jar Grades_v2.jar 10 39`

if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
  else echo "Test Failed"
fi



echo "----------------------"

echo "Test Case 2: Testing 40/50"

tc=`java -jar Grades_v2.jar 40 50`

if [ "$tc" = "Component Fail" ]
  then
  echo "Test Passed"
  else echo "Test Failed"
fi


echo "----------------------"

echo "Test Case 3: 52/70"

tc=`java -jar Grades_v2.jar 52 70`

if [ "$tc" = "Pass" ]
  then
  echo "Test Passed"
  else echo "Test Failed"
fi


echo "----------------------"

echo "Test Case 4: 72/80"

tc=`java -jar Grades_v2.jar 72 80`

if [ "$tc" = "Pass" ]
  then
  echo "Test Passed"
  else echo "Test Failed"
fi

echo "----------------------"

echo "Test Case 5: 82/90"

tc=`java -jar Grades_v2.jar 82 90`

if [ "$tc" = "Pass with Distinction" ]
  then
  echo "Test Passed"
  else echo "Test Failed"
fi


echo "----------------------"

echo "Test Case 6: 91/100"

tc=`java -jar Grades_v2.jar 91 100`

if [ "$tc" = "Pass with Distinction" ]
  then
  echo "Test Passed"
  else echo "Test Failed"
fi


echo "----------------------"

echo "Test Case 7: 100/100"

tc=`java -jar Grades_v2.jar 100 100`

if [ "$tc" = "Pass with Distinction" ]
  then
  echo "Test Passed"
  else echo "Test Failed"
fi




